package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * Created by 沐风 on 2024/4/16 11:27
 */
@Mapper
public interface UserMapper {

    /**
     * 查询是否为新用户
     * @param openid
     * @return
     */
    @Select("select * from user where openid = #{openid}")
    User getByOpenid(String openid);

    /**
     * 新增用户
     * @param user
     */
    void insert(User user);

    /**
     * 动态统计用户总数
     * @return
     */
    Integer countUser(Map map);

}
